			
			local lower1 = ${bottom}
			local mid = ${mid}
			local upper1 = `mid'-1
			local lower2 = `mid'+1
			local upper2 = ${top}
			
		// now run the code
	
			capture drop _xvar 
			capture drop _beta 
			capture drop _ciu 
			capture drop _cid
			g _xvar = .
			g _beta = .
			g _ciu = .
			g _cid = .

			local range = `upper1'-`lower1'+1
			forvalues i = 1/`range' { 
				replace _xvar = `lower1'+`i'-1 if _n==`i'
				local x = `lower1'+`i'-1
				replace _beta = _b[${yvar}`x'] if _n==`i'
				replace _cid = _b[${yvar}`x']-_se[${yvar}`x']*1.96 if _n==`i'
				replace _ciu = _b[${yvar}`x']+_se[${yvar}`x']*1.96 if _n==`i'
				}
			replace _beta = 0 if _n==`mid'-`lower1'+1
			replace _xvar = `mid' if _n==`mid'-`lower1'+1
			local range1 = `mid'-`lower1'+2
			local range2 = `upper2'-`lower2'+`mid'-`lower1'+2
			disp `range1'
			disp `range2'
			forvalues i = `range1'/`range2' { 
				replace _xvar = `lower1'+`i'-1 if _n==`i'
				local x = `lower1'+`i'-1
				replace _beta = _b[${yvar}`x'] if _n==`i'
				replace _cid = _b[${yvar}`x']-_se[${yvar}`x']*1.96 if _n==`i'
				replace _ciu = _b[${yvar}`x']+_se[${yvar}`x']*1.96 if _n==`i'
				}
			twoway ///
				(rcap _ciu _cid _xvar, color(maroon) xline(`mid', lpattern(shortdash))) ///
				(scatter _beta _xvar, color(maroon) yline(0,)) ///
				, graphregion(fcolor(white)) plotregion(lcolor(black)) xtitle("") leg(off) 
